<?php

namespace app\common\validate;

class GoodsPromoteValidate extends BaseValidate
{
    /**
         * 验证规则
         */
    protected $field = [
        'promote_name' => '推广名称' ,
        'promote_banner' => '专区背景图' ,
        'sort' => '权重' ,
        'create_time' => '创建时间' ,
        'update_time' => '更新时间' ,
        'create_admin' => '创建人' ,
        'update_admin' => '更新人' ,

    ];

    /**
     * 验证场景
     */
    protected $scene = [
        'getGoodsPromotePage'=>[],
        'getGoodsPromoteList'=>[],
        'setGoodsPromoteItem'=>[
            "id"=>'require|integer',
            'promote_name'=>'require',
            'promote_banner'=>'arrayHasOnlyStrings|min:1',
            'sort'=>'require|integer',
            'promote_goods'=>'arrayHasOnlyInts',
        ],
        'addGoodsPromoteItem'=>[
            'promote_name'=>'require',
            'promote_banner'=>'arrayHasOnlyStrings|min:1',
            'sort'=>'require|integer',
            'promote_goods'=>'arrayHasOnlyInts',
        ],
    ];

    /**
     * 提示消息
     */
    protected $message = [

    ];


}
